package designPatterns.xiangyuan;

import java.util.HashMap;
import java.util.Map;

/**
*@author created by zhanxianbo
*@date 2017年10月31日--上午10:31:10
*/
public class shapfactory {
	
	private static final Map<String,shap> map = new HashMap<>();
	
	public  static cicle getcicle(String color) {
		cicle c=(cicle)map.get("color");
		if (c==null) {
			c=new cicle(color);
			map.put("color", c);
			System.out.println("Creating circle of color : " + color);
		}
		
		return c; 
		
	}

}


